package com.project.mapper;

import com.project.bean.StudentBean;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface IStudentMapper {
    //添加
    @Insert("insert into t_springStudent(s_name,s_birthday) values(#{name},#{birthday})")
    public void add(StudentBean student);
    //删除
    @Delete("delete from t_springStudent where pk_sId = #{id}")
    public void del(int id);
    //修改
    @Update("update t_springStudent set s_name = #{name} where pk_sId = #{id}")
    public void update(@Param("id") int id, @Param("name") String name);
    //查询所有
    @Select("select * from t_springStudent")
    @ResultMap("StudentMap")
    public List<StudentBean> findAll();
}
